<?php
	defined ('CELL_INDEX') or die ('access denied');

	$Owner = Fetch ('owner');
	$Owner or Relocate ('');

	if (isset ($_POST ['work'])) {
		$Number = $_POST ['work'];
		if ($Result = pg_affected_rows (pg_query ("insert into \"NumbersWork\" values ($Owner, $Number);"))) {
			$Message = "New work number added successfully.";
		} else {
			if ($Error = pg_last_error ()) {
				$Message = "New work number was not added: $Error";
			} else $Message = "New work number was not added (and there was no error message)";
		}
		LeaveMessage ($Message);
		ViewSuggest ('user');
	}

?>